#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
 
using namespace std;
using namespace __gnu_pbds;
 
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fbo find_by_order
#define ook order_of_key
 
typedef long long ll;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef long double ld; 
typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> pbds;
typedef set<ll>::iterator sit;
typedef map<ll,ll>::iterator mit;

int a[31][31];
int f[333];
int n,m;
int dx[4] = {1,-1,0,0};
int dy[4] = {0,0,1,-1};
char dir[4] = {'D', 'U', 'R', 'L'};
char V[3] = {'R', 'G', 'B'};

bool valid(int x, int y)
{
	return (x>=0&&x<n&&y>=0&&y<m);
}

ii dist(ii a, ii b)
{
	return mp(abs(a.fi-b.fi)+abs(a.se-b.se),max(abs(a.fi-b.fi),abs(a.se-b.se)));
}

int curx,cury;
int cx,cy;

void go(int c)
{
	int best = -1; ii mn = mp(int(1e9),int(1e9));
	for(int i=0;i<4;i++)
	{
		if(valid(curx+dx[i],cury+dy[i]))
		{
			if(a[curx+dx[i]][cury+dy[i]]==c&&dist(mp(curx+dx[i],cury+dy[i]),mp(cx,cy))<mn)
			{
				best = i; mn = dist(mp(curx+dx[i],cury+dy[i]),mp(cx,cy));
			}
		}
	}
	curx += dx[best]; cury += dy[best];
	cout<<dir[best];
}

int main()
{
	freopen("snake.in","r",stdin);
	freopen("snake.out","w",stdout);
	ios_base::sync_with_stdio(0); cin.tie(0);
	string s;
	cin>>s;
	n=m=30;
	f['R'] = 0; f['G'] = 1; f['B'] = 2;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<m;j++)
		{
			if(i%3==0) a[i][j]=(j/2)%2;
			else if(i%3==2) a[i][j]=2;
			else a[i][j]=(j/2+1)%2;
			if(a[i][j]<0) a[i][j]+=3;
		}
	}
	cout<<n<<' '<<m<<'\n';
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<m;j++)
		{
			cout<<V[a[i][j]];
		}
		cout<<'\n';
	}
	cx=n/2; cy=m/2;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<m;j++)
		{
			if(dist(mp(i,j),mp(cx,cy))<=dist(mp(curx,cury),mp(cx,cy))&&a[i][j]==f[s[0]])
			{
				curx=i; cury=j;
			}
		}
	}
	cout<<curx+1<<' '<<cury+1<<'\n';
	for(int i=1;i<s.length();i++)
	{
		go(f[s[i]]);
	}
	cout<<'\n';
}

